import DatePicker from './DatePicker';

const datePicker = new DatePicker(
  [
    2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
    2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023
  ],
  [2021, 2, 19]
);

//获取首次渲染日期
console.log(datePicker.getCurrentDate());

//监听当前日期变化
datePicker.watch(() => {
  console.log(datePicker.getCurrentDate());
});
